﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace Paperless_Library
{
    [DataContract]
    public class Document
    {
        #region Atributos
        private string _DocumentName;
        private DateTime _Date;        
        private string _DocumentType;
        private string _UserSenderName;
        private string _UserReceiverName;
        private byte[] _Content;
        private byte[] _Checksum;
        #endregion

        #region Propiedades
        /// <summary>
        /// 
        /// </summary>
        [DataMember]
        public string DocumentName
        {
            get { return _DocumentType; }
            set { _DocumentType = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        [DataMember]
        public DateTime Date
        {
            get { return _Date; }
            set { _Date = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        [DataMember]
        public string DocumentType
        {
            get { return DocumentType; }
            set { DocumentType = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        [DataMember]
        public string UserSenderName
        {
            get { return _UserSenderName; }
            set { _UserSenderName = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        [DataMember]
        public string UserReceiverName
        {
            get { return _UserReceiverName; }
            set { _UserReceiverName = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        public byte[] Content
        {
            get { return _Content; }
            set { _Content = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        [DataMember]
        public byte[] Checksum
        {
            get { return _Checksum; }
            set { _Checksum = value; }
        }
        #endregion

        #region Contructores
        /// <summary>
        /// Constructor vacio de la clase
        /// </summary>
        public Document()
        {
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="documentName"></param>
        /// <param name="date"></param>
        /// <param name="documentType"></param>
        /// <param name="userSenderName"></param>
        /// <param name="userRecieverName"></param>
        public Document(string documentName, DateTime date, string documentType, string userSenderName, string userRecieverName)
        {
            _DocumentName = documentName;
            _Date = date;
            _DocumentType = documentType;
            _UserSenderName = userSenderName;
            _UserReceiverName = userRecieverName;
            
        }
        #endregion
    }
}
